#!/bin/bash 
function begin() { 
    ID=`ps -ef | grep $1 | grep -v grep | awk '{print $2}'`
    echo $ID
    for id in $ID
    do
        kill  $id
        echo "kill $id"
    done

    nohup ./$1 > /dev/null 2>&1 &
 } 

begin etm
begin edm
begin emm
begin eonvif
begin emagical


